home *** CD-ROM | disk | FTP | other *** search
AmigaBASIC Source Code | 1986-04-19 | 2.8 KB | 88 lines | [MSBC/MSBB] |
- 'Statement Adder for RealFont, KbEquiv, and setItemStyle libraries
- 'By Clear Lake Research and David Kelly
- '© Clear Lake Research, Inc.
- 'used with permission
- 'NOTE: The hex codes for RealFont, KbEquiv, and setItemStyle
- 'are copyrighted by Clear Lake Research.
- 'By using Statement Adder you may create these libraries
- 'then add them to your ToolLib Libraries using
- 'Statement Mover (provided with CLR ToolLib).
- 'This program requires ToolLib and MS Basic 2.0 or 2.1
- 'Run this program only once.
-
- LIBRARY"ToolLib"
- DIM p%(120)
- DEFINT i,j
- FOR j=1 TO 3
- ERASE p%
- REM read hex code
- READ nm$
- READ id%
- READ numofbytes%
- DIM p%(numofbytes%)
- FOR i%= 1 TO numofbytes%
- READ p%(i%)
- NEXT i%
-
-
- fileRefNum%=0:H!=0
- openResFile"NewLibraries",fileRefNum% 'openResFile
- saveArray fileRefNum%,p%(1),numofbytes%*2,id%,nm$ 'save as type 'GNRL'
- GetNamedRes fileRefNum%,"GNRL",nm$,H! 'get the resource
- detachRes H! 'Now it is not a resource
- AddRes fileRefNum%,H!,"CODE",id%,nm$ 'Now its type CODE
- releaseRes H!
- GetNamedRes fileRefNum%,"GNRL",nm$,H! 'Not needed
- removeRes fileRefNum%,H! 'so remove it
- REM early printings of the manual had the syntax of removeRes wrong
- REM The first argument was left off
- CloseResFile fileRefNum%
- REM make sure libinit is in the file before running it!
- NEXT j
- PRINT"Done"
-
- 'setItemStyle Library
- DATA "setItemStyle" :REM name of resource nm$
- DATA 5001: REM id number id%
- DATA 33: REM number of bytes
- DATA &H8,&H0,&H4EAD,&H2A,&HC00
- DATA &H3,&H662C,&H3A12,&H5245,&H4EAD
- DATA &H2A,&HC00,&H3,&H661E,&H3612
- DATA &H4EAD,&H2A,&HC00,&H3,&H6612
- DATA &H3812,&H42A7,&H3F05,&HA949,&H3F03
- DATA &H3F04,&HA942,&H7000,&H4E75,&H740D
- DATA &H7000,&H4EAD,&H42
-
-
-
- 'RealFont Library
- DATA "RealFont": REM name of resource nm$
- DATA 703: REM id number id%
- DATA 37: REM number of bytes
- DATA &H8,&H0,&H4EAD,&H2A,&HC00
- DATA &H3,&H6632,&H3812,&H4EAD,&H2A
- DATA &HC00,&H3,&H6626,&H3A12,&H4EAD
- DATA &H2A,&HC40,&H3,&H661A,&H4267
- DATA &H3F04,&H3F05,&HA902,&H301F,&H6708
- DATA &H34BC,&HFFFF,&H7000,&H4E75,&H4252
- DATA &H7000,&H4E75,&H7000,&H303C,&HD
- DATA &H4EAD,&H42
-
- 'KbEquiv Library
- DATA "KbEquiv":REM name of resource nm$
- DATA 191:REM id number id%
- DATA 58: REM number of bytes
- DATA &H0,&H1,&H4EAD,&H2A,&HC00
- DATA &H3,&H665E,&H3812,&H5244,&H4EAD
- DATA &H2A,&HC00,&H3,&H6650,&H3A12
- DATA &H4EAD,&H2A,&HC00,&H2,&H6644
- DATA &H264A,&H4EAD,&H82,&H4EAD,&H8A
- DATA &H1613,&H42A7,&H3F04,&HA949,&H2657
- DATA &H2653,&H303C,&HE,&H1233,&H0
- DATA &H5241,&HD041,&H5345,&H6008,&H1233
- DATA &H0,&H5A41,&HD041,&H51CD,&HFFF6
- DATA &H1233,&H0,&H5441,&HD041,&H1783
- DATA &H0,&HA948,&H7000,&H4E75,&H740D
- DATA &H7000,&H4EAD,&H42
-
-